//根据粉丝数获取博主
function getBlogByFans(size,index){
	var url = "/HyperIT/userdetail/findUdByFans";
	var parm = "size="+size+"&indexPageNum="+index;
	$.get(url,parm,function(data){
		if (data.serviceResult) {
			var list = data.resultParm.userDetail_list;
			showBloger(list);
		} else{
			messageTip(data.resultInfo);
		}
	});
}
//show
function showBloger(list){
	for(var i = 0; i<list.length; i++){
		$(".items").append('<div class="blog_item">'+
							'<div class="bg">'+
								'<img src="'+getRealPath()+list[i].head+'"/>'+
							'</div>'+
							'<div class="author">'+
								'<a href="'+getRealPath()+'/views/blog/theblog.html?'+list[i].id+'"><img src="'+getRealPath()+list[i].head+'"/></a>'+
							'</div>'+
							'<div class="blog-info">'+
								'<div class="info-text">'+
									'<span class="name">'+list[i].name+'</span>'+
									'<div class="field">'+
										list[i].position_name+
									'</div>'+
									'<div class="box article">'+
										'<span>'+list[i].article+'</span>'+
										'<span>文章</span>'+
									'</div>'+
									'<div class="box fans">'+
										'<span>'+list[i].fans+'</span>'+
										'<span>粉丝</span>'+
									'</div>'+
								'</div>'+
							'</div>'+
						'</div>');
	}
}
//绘制首页右端的小头像
function otherBloger(){
	var url = "/HyperIT/userdetail/findUdByArticle";
	var parm = "size=20&indexPageNum=1";
	$.get(url,parm,function(data){
		if (data.serviceResult) {
			var list = data.resultParm.userDetail_list;
			showBlogerSmall(list);
		} else{
			messageTip(data.resultInfo);
		}
	});
}
//画小头像
function showBlogerSmall(list){
	for(var i = 0; i<list.length; i++){
		$(".blog-right-bar").append('<div class="bloger-box">'+
										'<a href="'+getRealPath()+'/views/blog/theblog.html?'+list[i].id+'" title="'+list[i].name+'">'+
										'<img src="'+getRealPath()+list[i].head+'"/></a>'+
										'<span>'+list[i].name+'</span>'+
									'</div>'	);
	}
}
